home *** CD-ROM | disk | FTP | other *** search
/ Game Programming in C++ - Start to Finish / GameProgrammingS.iso / Peon / PeonSDK-Win32-1.0.0.exe / {app} / PeonMain / include / al / alc.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-09-16  |  4.9 KB  |  154 lines

  1. #ifndef ALC_CONTEXT_H_
  2. #define ALC_CONTEXT_H_
  3.  
  4. #include "altypes.h"
  5. #include "alctypes.h"
  6.  
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10.  
  11. #define ALC_VERSION_0_1         1
  12.  
  13. #ifdef _WIN32
  14.  typedef struct ALCdevice_struct ALCdevice;
  15.  typedef struct ALCcontext_struct ALCcontext;
  16.  #ifndef _XBOX
  17.   #ifdef _OPENAL32LIB
  18.    #define ALCAPI __declspec(dllexport)
  19.   #else
  20.    #define ALCAPI __declspec(dllimport)
  21.   #endif
  22.   #define ALCAPIENTRY __cdecl
  23.  #endif
  24. #endif
  25.  
  26. #ifdef TARGET_OS_MAC
  27.  #if TARGET_OS_MAC
  28.   #pragma export on
  29.  #endif
  30. #endif
  31.  
  32. #ifndef ALCAPI
  33.  #define ALCAPI
  34. #endif
  35.  
  36. #ifndef ALCAPIENTRY
  37.  #define ALCAPIENTRY
  38. #endif
  39.  
  40.  
  41. #ifndef AL_NO_PROTOTYPES
  42.  
  43. ALCAPI ALCcontext * ALCAPIENTRY alcCreateContext( ALCdevice *dev,
  44.                         const ALCint* attrlist );
  45.  
  46. /**
  47.  * There is no current context, as we can mix
  48.  *  several active contexts. But al* calls
  49.  *  only affect the current context.
  50.  */
  51. #ifdef LINUX_AL
  52. /* spec has return value as ALCboolean */
  53. ALCAPI ALCenum ALCAPIENTRY alcMakeContextCurrent( ALCcontext *alcHandle );
  54. #else
  55. ALCAPI ALCboolean ALCAPIENTRY alcMakeContextCurrent(ALCcontext *alcHandle);
  56. #endif
  57.  
  58. /**
  59.  * Perform processing on a synced context, non-op on a asynchronous
  60.  * context.
  61.  */
  62.  
  63. #ifdef LINUX_AL
  64. /* spec has return value as void */
  65. ALCAPI ALCcontext * ALCAPIENTRY alcProcessContext( ALCcontext *alcHandle );
  66. #else
  67. ALCAPI void ALCAPIENTRY alcProcessContext(ALCcontext* context);
  68. #endif
  69.  
  70. /**
  71.  * Suspend processing on an asynchronous context, non-op on a
  72.  * synced context.
  73.  */
  74. ALCAPI void ALCAPIENTRY alcSuspendContext( ALCcontext *alcHandle );
  75.  
  76. #ifdef LINUX_AL
  77. /* spec has return value as void */
  78. ALCAPI ALCenum ALCAPIENTRY alcDestroyContext( ALCcontext *alcHandle );
  79. #else
  80. ALCAPI void ALCAPIENTRY alcDestroyContext(ALCcontext* context);
  81. #endif
  82.  
  83. ALCAPI ALCenum ALCAPIENTRY alcGetError( ALCdevice *dev );
  84.  
  85. ALCAPI ALCcontext * ALCAPIENTRY alcGetCurrentContext( ALCvoid );
  86.  
  87. ALCAPI ALCdevice * ALCAPIENTRY alcOpenDevice( const ALubyte *tokstr );
  88. ALCAPI void ALCAPIENTRY alcCloseDevice( ALCdevice *dev );
  89.  
  90. ALCAPI ALCboolean ALCAPIENTRY alcIsExtensionPresent(ALCdevice *device, const ALCubyte *extName);
  91. ALCAPI void  * ALCAPIENTRY alcGetProcAddress(ALCdevice *device, const ALCubyte *funcName);
  92. ALCAPI ALCenum    ALCAPIENTRY alcGetEnumValue(ALCdevice *device, const ALCubyte *enumName);
  93.  
  94. ALCAPI ALCdevice* ALCAPIENTRY alcGetContextsDevice(ALCcontext *context);
  95.  
  96.  
  97. /**
  98.  * Query functions
  99.  */
  100.  
  101. ALCAPI const ALCubyte * ALCAPIENTRY alcGetString( ALCdevice *deviceHandle, ALCenum token );
  102. #ifdef LINUX_AL
  103. ALCAPI void ALCAPIENTRY alcGetIntegerv(ALCdevice *deviceHandle, ALCenum  token , ALCsizei  size , ALCint *dest );
  104. #else
  105. ALCAPI void ALCAPIENTRY alcGetIntegerv(ALCdevice *device,ALCenum param,ALCsizei size,ALCint *data);
  106. #endif
  107.  
  108. #else // AL_NO_PROTOTYPES
  109.       ALCAPI ALCcontext *    ALCAPIENTRY (*alcCreateContext)( ALCdevice *dev, const ALCint* attrlist );
  110. #ifdef LINUX_AL
  111.       ALCAPI ALCenum         ALCAPIENTRY (*alcMakeContextCurrent)( ALCcontext *alcHandle );
  112. #else
  113.       ALCAPI ALCboolean      ALCAPIENTRY (*alcMakeContextCurrent)(ALCcontext *context);
  114. #endif
  115. #ifdef LINUX_AL
  116.       ALCAPI ALCcontext *    ALCAPIENTRY (*alcProcessContext)( ALCcontext *alcHandle );
  117. #else
  118.       ALCAPI void *          ALCAPIENTRY (*alcProcessContext)( ALCcontext *alcHandle );
  119. #endif
  120.       ALCAPI void            ALCAPIENTRY (*alcSuspendContext)( ALCcontext *alcHandle );
  121. #ifdef LINUX_AL
  122.       ALCAPI ALCenum         ALCAPIENTRY (*alcDestroyContext)( ALCcontext *alcHandle );
  123. #else
  124.       ALCAPI void             ALCAPIENTRY (*alcDestroyContext)( ALCcontext* context );
  125. #endif
  126.       ALCAPI ALCenum         ALCAPIENTRY (*alcGetError)( ALCdevice *dev );
  127.       ALCAPI ALCcontext *    ALCAPIENTRY (*alcGetCurrentContext)( ALCvoid );
  128.       ALCAPI ALCdevice *     ALCAPIENTRY (*alcOpenDevice)( const ALCubyte *tokstr );
  129.       ALCAPI void            ALCAPIENTRY (*alcCloseDevice)( ALCdevice *dev );
  130.       ALCAPI ALCboolean      ALCAPIENTRY (*alcIsExtensionPresent)( ALCdevice *device, const ALCubyte *extName );
  131.       ALCAPI void  *         ALCAPIENTRY (*alcGetProcAddress)(ALCdevice *device, const ALCubyte *funcName );
  132.       ALCAPI ALCenum         ALCAPIENTRY (*alcGetEnumValue)(ALCdevice *device, const ALCubyte *enumName);
  133.       ALCAPI ALCdevice*      ALCAPIENTRY (*alcGetContextsDevice)(ALCcontext *context);
  134.       ALCAPI const ALCubyte* ALCAPIENTRY (*alcGetString)( ALCdevice *deviceHandle, ALCenum token );
  135. #ifdef LINUX_AL
  136.       ALCAPI void            ALCAPIENTRY (*alcGetIntegerv*)( ALCdevice *deviceHandle, ALCenum  token , ALCsizei  size , ALCint *dest );
  137. #else
  138.       ALCAPI void            ALCAPIENTRY (*alcGetIntegerv*)( ALCdevice *deviceHandle, ALCenum  token , ALCsizei  size , ALCint *dest );
  139. #endif
  140.  
  141. #endif /* AL_NO_PROTOTYPES */
  142.  
  143. #ifdef TARGET_OS_MAC
  144. #if TARGET_OS_MAC
  145. #pragma export off
  146. #endif /* TARGET_OS_MAC */
  147. #endif /* TARGET_OS_MAC */
  148.  
  149. #ifdef __cplusplus
  150. }
  151. #endif
  152.  
  153. #endif /* ALC_CONTEXT_H_ */
  154.